<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta charset="utf-8" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<title></title>
<!--<script type="text/javascript" src="assets/js/jquery/1.11.3/jquery.min.js"></script>-->
<script src="assets/js/echart/3.1.10/echarts.common.min.js"></script>
<!--[if lt IE 9]>
<script src="assets/js/html5.js"></script>
<![endif]-->

<link rel="stylesheet" type="text/css" href="assets/css/style.css"/>
</head>
<body>
<div class="main">
	<div class="chart-wrap">
		<div class="chart" id="chartType_tp1"></div>
	</div>
	<div class="chart-wrap">
		<div class="chart" id="chartType_tp2"></div>
	</div>
</div>
<script type="text/javascript">
	var chartType_tp1 = echarts.init(document.getElementById('chartType_tp1'));
	var optiontp1 = {
        title: {
            text: '2016年1-4月类型分析[事件]',
            top:'top',
            left:'center'
        },
        tooltip: {
        	trigger: 'item'//axis,item
        	,formatter:function(p){
        		if(p.seriesType=='bar'){
        			var pr = sindex2str(p.seriesIndex);
	        		return '['+pr+']<br>'+p.name+'<br>'+p.seriesName+' : '+p.value;
        		}else{//line
        			return p.name+'<br>'+p.seriesName+' : '+p.value+'%';
        		}
        	}
        },
        color:['#2f4554', '#61a0a8', '#d48265','#c23531'],
        legend: {
            show:true
            ,top:'bottom'
            ,left:'center'
            ,width :600
            ,itemGap :10
            ,data:['宣传广告','施工管理','街面秩序','市容环境'
            ,'[宣传广告]按期处置率','[施工管理]按期处置率','[街面秩序]按期处置率','[市容环境]按期处置率']
        },
        grid:{
        	show :true,
        	bottom:80
        },
        xAxis: [
	        {
	            axisLabel :{
	            	interval :0
	            },
        		splitLine :{
        			show:false
        		},
	            data: ['2016年1月','2016年2月','2016年3月','2016年4月']
	        }
        ],
        yAxis: [
        	{
        		name :'数量'
        	},
        	{
        		name :'百分比',
        		axisLabel :{
        			formatter :'{value}%'
        		},
        		splitLine :{
        			show:false
        		}
        		,min:'dataMin'
        	}
        ],
        series: [
	        {
	        	name:'宣传广告',
	        	type:'bar',
	        	stack:'a',
	        	data:[
	        	{value:480,
	        	itemStyle:{normal:{color:'#2f4554'}}},
	        	{value:303,
	        	itemStyle:{normal:{color:'#2f4554'}}},
	        	{value:414,
	        	itemStyle:{normal:{color:'#2f4554'}}},
	        	{value:374,
	        	itemStyle:{normal:{color:'#2f4554'}}}]
	        },
	        {
	        	name:'施工管理',
	        	type:'bar',
	        	stack:'a',
	        	data:[
	        	{value:111,
	        	itemStyle:{normal:{color:'#61a0a8'}}},
	        	{value:79,
	        	itemStyle:{normal:{color:'#61a0a8'}}},
	        	{value:253,
	        	itemStyle:{normal:{color:'#61a0a8'}}},
	        	{value:218,
	        	itemStyle:{normal:{color:'#61a0a8'}}}]
	        },
	        {
	        	name:'街面秩序',
	        	type:'bar',
	        	stack:'a',
	        	data:[
	        	{value:1323,
	        	itemStyle:{normal:{color:'#d48265'}}},
	        	{value:1021,
	        	itemStyle:{normal:{color:'#d48265'}}},
	        	{value:1525,
	        	itemStyle:{normal:{color:'#d48265'}}},
	        	{value:1375,
	        	itemStyle:{normal:{color:'#d48265'}}}]
	        },
	        {
	        	name:'市容环境',
	        	type:'bar',
	        	stack:'a',
	        	data:[
	        	{value:20,
	        	itemStyle:{normal:{color:'#c23531'}}},
	        	{value:20,
	        	itemStyle:{normal:{color:'#c23531'}}},
	        	{value:50,
	        	itemStyle:{normal:{color:'#c23531'}}},
	        	{value:31,
	        	itemStyle:{normal:{color:'#c23531'}}}]
	        },
	        /*立案数-------end*/
	        {
	        	name:'宣传广告',
	        	type:'bar',
	        	stack:'b',
	        	data:[
	        	{value:480,
	        	itemStyle:{normal:{color:'#2f4554'}}},
	        	{value:303,
	        	itemStyle:{normal:{color:'#2f4554'}}},
	        	{value:413,
	        	itemStyle:{normal:{color:'#2f4554'}}},
	        	{value:374,
	        	itemStyle:{normal:{color:'#2f4554'}}}]
	        },
	        {
	        	name:'施工管理',
	        	type:'bar',
	        	stack:'b',
	        	data:[
	        	{value:111,
	        	itemStyle:{normal:{color:'#61a0a8'}}},
	        	{value:79,
	        	itemStyle:{normal:{color:'#61a0a8'}}},
	        	{value:253,
	        	itemStyle:{normal:{color:'#61a0a8'}}},
	        	{value:216,
	        	itemStyle:{normal:{color:'#61a0a8'}}}]
	        },
	        {
	        	name:'街面秩序',
	        	type:'bar',
	        	stack:'b',
	        	data:[
	        	{value:1323,
	        	itemStyle:{normal:{color:'#d48265'}}},
	        	{value:1019,
	        	itemStyle:{normal:{color:'#d48265'}}},
	        	{value:1523,
	        	itemStyle:{normal:{color:'#d48265'}}},
	        	{value:1373,
	        	itemStyle:{normal:{color:'#d48265'}}}]
	        },
	        {
	        	name:'市容环境',
	        	type:'bar',
	        	stack:'b',
	        	data:[
	        	{value:20,
	        	itemStyle:{normal:{color:'#c23531'}}},
	        	{value:20,
	        	itemStyle:{normal:{color:'#c23531'}}},
	        	{value:50,
	        	itemStyle:{normal:{color:'#c23531'}}},
	        	{value:31,
	        	itemStyle:{normal:{color:'#c23531'}}}]
	        },
	        /*处置数-------end*/
	        {
	        	name:'宣传广告',
	        	type:'bar',
	        	stack:'c',
	        	data:[
	        	{value:475,
	        	itemStyle:{normal:{color:'#2f4554'}}},
	        	{value:302,
	        	itemStyle:{normal:{color:'#2f4554'}}},
	        	{value:413,
	        	itemStyle:{normal:{color:'#2f4554'}}},
	        	{value:374,
	        	itemStyle:{normal:{color:'#2f4554'}}}]
	        },
	        {
	        	name:'施工管理',
	        	type:'bar',
	        	stack:'c',
	        	data:[
	        	{value:109,
	        	itemStyle:{normal:{color:'#61a0a8'}}},
	        	{value:79,
	        	itemStyle:{normal:{color:'#61a0a8'}}},
	        	{value:252,
	        	itemStyle:{normal:{color:'#61a0a8'}}},
	        	{value:215,
	        	itemStyle:{normal:{color:'#61a0a8'}}}]
	        },
	        {
	        	name:'街面秩序',
	        	type:'bar',
	        	stack:'c',
	        	data:[
	        	{value:1318,
	        	itemStyle:{normal:{color:'#d48265'}}},
	        	{value:1009,
	        	itemStyle:{normal:{color:'#d48265'}}},
	        	{value:1507,
	        	itemStyle:{normal:{color:'#d48265'}}},
	        	{value:1369,
	        	itemStyle:{normal:{color:'#d48265'}}}]
	        },
	        {
	        	name:'市容环境',
	        	type:'bar',
	        	stack:'c',
	        	data:[
	        	{value:20,
	        	itemStyle:{normal:{color:'#c23531'}}},
	        	{value:19,
	        	itemStyle:{normal:{color:'#c23531'}}},
	        	{value:50,
	        	itemStyle:{normal:{color:'#c23531'}}},
	        	{value:31,
	        	itemStyle:{normal:{color:'#c23531'}}}]
	        },
	        /*按期处置数-------end*/
	        {
	       		name:'[宣传广告]按期处置率',
	       		type:'line',
	       		symbol :'diamond',
	       		symbolSize :10,
	       		yAxisIndex :1,
	       		itemStyle:{
	       			normal:{
	       				color:'#FE9A01'
	       			}
	       		},
	       		data:[98.95,99.66,99.75,100]
	        },
	        {
	       		name:'[施工管理]按期处置率',
	       		type:'line',
	       		symbol :'rect',
	       		symbolSize :10,
	       		yAxisIndex :1,
	       		itemStyle:{
	       			normal:{
	       				color:'#00E3D8'
	       			}
	       		},
	       		data:[98.19,100,99.60,98.62]
	        },
	        {
	       		name:'[街面秩序]按期处置率',
	       		type:'line',
	       		symbol :'triangle',
	       		symbolSize :10,
	       		yAxisIndex :1,
	       		itemStyle:{
	       			normal:{
	       				color:'#e4b503'
	       			}
	       		},
	       		data:[99.62,98.82,98.81,99.56]
	        },
	        {
	       		name:'[市容环境]按期处置率',
	       		type:'line',
	       		symbol :'circle',
	       		symbolSize :10,
	       		yAxisIndex :1,
	       		itemStyle:{
	       			normal:{
	       				color:'#688ff4'
	       			}
	       		},
	       		data:[100,95,100,100]
	        },
        ]
    };
    chartType_tp1.setOption(optiontp1);
    
    var chartType_tp2 = echarts.init(document.getElementById('chartType_tp2'));
	var optiontp2 = {
        title: {
            text: '2016年1-4月类型分析[部件]',
            top:'top',
            left:'center'
        },
        tooltip: {
        	trigger: 'item'//axis,item
        	,formatter:function(p){
        		if(p.seriesType=='bar'){
        			var pr = sindex2str(p.seriesIndex);
	        		return '['+pr+']<br>'+p.name+'<br>'+p.seriesName+' : '+p.value;
        		}else{//line
        			return p.name+'<br>'+p.seriesName+' : '+p.value+'%';
        		}
        	}
        },
        color:['#FE9A01', '#c63f3d', '#029896','#688ff4','#23ae39','#01b3d9'],
        legend: {
            show:true
            ,top:'bottom'
            ,left:'center'
            ,width :600
            ,itemGap :10
            ,selected:{
            	'扩展部件':false,
            	'[扩展部件]按期处置率':false
            }
            ,data:['公共设施','道路交通','市容环境','园林绿化','房屋土地','扩展部件'
            ,'[公共设施]按期处置率','[道路交通]按期处置率','[市容环境]按期处置率','[园林绿化]按期处置率','[房屋土地]按期处置率','[扩展部件]按期处置率']
        },
        grid:{
        	show :true,
        	bottom:100
        },
        xAxis: [
	        {
	            axisLabel :{
	            	interval :0
	            },
        		splitLine :{
        			show:false
        		},
	            data: ['2016年1月','2016年2月','2016年3月','2016年4月']
	        }
        ],
        yAxis: [
        	{
        		name :'数量'
        	},
        	{
        		name :'百分比',
        		axisLabel :{
        			formatter :'{value}%'
        		},
        		splitLine :{
        			show:false
        		}
        		,min:'dataMin'
        	}
        ],
        series: [
	        {
	        	name:'公共设施',
	        	type:'bar',
	        	stack:'a',
	        	data:[0,0,3,3]
	        },
	        {
	        	name:'道路交通',
	        	type:'bar',
	        	stack:'a',
	        	data:[29,18,75,107]
	        },
	        {
	        	name:'市容环境',
	        	type:'bar',
	        	stack:'a',
	        	data:[2,0,2,3]
	        },
	        {
	        	name:'园林绿化',
	        	type:'bar',
	        	stack:'a',
	        	data:[1,1,1,2]
	        },
	        {
	        	name:'房屋土地',
	        	type:'bar',
	        	stack:'a',
	        	data:[1,0,0,0]
	        },
	        {
	        	name:'扩展部件',
	        	type:'bar',
	        	stack:'a',
	        	data:[0,0,0,0]
	        },
	        /*立案数-------end*/
	        {
	        	name:'公共设施',
	        	type:'bar',
	        	stack:'b',
	        	data:[0,0,1,2]
	        },
	        {
	        	name:'道路交通',
	        	type:'bar',
	        	stack:'b',
	        	data:[23,15,74,105]
	        },
	        {
	        	name:'市容环境',
	        	type:'bar',
	        	stack:'b',
	        	data:[2,0,2,2]
	        },
	        {
	        	name:'园林绿化',
	        	type:'bar',
	        	stack:'b',
	        	data:[1,1,1,2]
	        },
	        {
	        	name:'房屋土地',
	        	type:'bar',
	        	stack:'b',
	        	data:[1,0,0,0]
	        },
	        {
	        	name:'扩展部件',
	        	type:'bar',
	        	stack:'b',
	        	data:[0,0,0,0]
	        },
	        /*处置数-------end*/
	        {
	        	name:'公共设施',
	        	type:'bar',
	        	stack:'c',
	        	data:[0,0,1,1]
	        },
	        {
	        	name:'道路交通',
	        	type:'bar',
	        	stack:'c',
	        	data:[13,8,70,102]
	        },
	        {
	        	name:'市容环境',
	        	type:'bar',
	        	stack:'c',
	        	data:[2,0,2,2]
	        },
	        {
	        	name:'园林绿化',
	        	type:'bar',
	        	stack:'c',
	        	data:[1,1,1,2]
	        },
	        {
	        	name:'房屋土地',
	        	type:'bar',
	        	stack:'c',
	        	data:[1,0,0,0]
	        },
	        {
	        	name:'扩展部件',
	        	type:'bar',
	        	stack:'c',
	        	data:[0,0,0,0]
	        },
	        /*按期处置数-------end*/
	        {
	       		name:'[公共设施]按期处置率',
	       		type:'line',
	       		symbol :'diamond',
	       		symbolSize :10,
	       		yAxisIndex :1,
	       		itemStyle:{
	       			normal:{
	       				color:'#91c7ae'
	       			}
	       		},
	       		data:[0,0,33.33,33.33]
	        },
	        {
	       		name:'[道路交通]按期处置率',
	       		type:'line',
	       		symbol :'diamond',
	       		symbolSize :10,
	       		yAxisIndex :1,
	       		itemStyle:{
	       			normal:{
	       				color:'#749f83'
	       			}
	       		},
	       		data:[44.82,44.44,93.33,95.32]
	        },
	        {
	       		name:'[市容环境]按期处置率',
	       		type:'line',
	       		symbol :'diamond',
	       		symbolSize :10,
	       		yAxisIndex :1,
	       		itemStyle:{
	       			normal:{
	       				color:'#ca8622'
	       			}
	       		},
	       		data:[100,0,100,66.66]
	        },
	        {
	       		name:'[园林绿化]按期处置率',
	       		type:'line',
	       		symbol :'diamond',
	       		symbolSize :10,
	       		yAxisIndex :1,
	       		itemStyle:{
	       			normal:{
	       				color:'#bda29a'
	       			}
	       		},
	       		data:[100,100,100,100]
	        },
	        {
	       		name:'[房屋土地]按期处置率',
	       		type:'line',
	       		symbol :'diamond',
	       		symbolSize :10,
	       		yAxisIndex :1,
	       		itemStyle:{
	       			normal:{
	       				color:'#546570'
	       			}
	       		},
	       		data:[100,0,0,0]
	        },
	        {
	       		name:'[扩展部件]按期处置率',
	       		type:'line',
	       		symbol :'diamond',
	       		symbolSize :10,
	       		yAxisIndex :1,
	       		itemStyle:{
	       			normal:{
	       				color:'#c4ccd3'
	       			}
	       		},
	       		data:[0,0,0,0]
	       		,
	        },
        ]
    };
    chartType_tp2.setOption(optiontp2);

/*---common-functions----*/
function sindex2str(sindex){
	var prnum = sindex+1;
	var pr_ = '立案数';
	if( prnum > 4){
		pr_ = '处置数';
		if(prnum > 8){
			pr_ = '按期处置数';
		}
	}
	return pr_
}
</script>
</body>
</html>
